<template>
  <a-drawer :open="visible" title="门店类型详情" @close="onClose">
    <template #closeIcon>
      <close @on-close="onClose" />
    </template>
    <a-card size="small" title="基本信息">
      <a-descriptions size="small" :column="3">
        <a-descriptions-item label="门店类型">{{ options.level_name }}</a-descriptions-item>
        <a-descriptions-item label="备注">{{ options.remark }}</a-descriptions-item>
        <a-descriptions-item label="创建时间">{{ options.create_time }}</a-descriptions-item>
      </a-descriptions>
    </a-card>
    <template #footer>
      <a-button @click="onClose">取消</a-button>
    </template>
  </a-drawer>
</template>

<script setup lang="ts">
import { ref } from 'vue'

defineExpose({
  showDrawer
})
const emit = defineEmits(['refresh'])

// --------------------- Drawer 显示与隐藏 ---------------------
// 是否展示
const visible = ref(false)
// 详情
const options = ref({})

function showDrawer(item) {
  options.value = item
  visible.value = true
}

const onClose = () => {
  visible.value = false
}
</script>
